package com.sun.aviator;

import com.googlecode.aviator.AviatorEvaluator;
import com.googlecode.aviator.AviatorEvaluatorInstance;
import com.sun.aviator.fun.DivideFuntion;

/**
 * @Author: Suncl
 * @Date: 2023/10/27 17:14
 */
public class AviatorContext {
    private static  AviatorEvaluatorInstance instance ;

    public static AviatorEvaluatorInstance getInstance(){
        if (instance == null) {
            instance = AviatorEvaluator.getInstance();
            instance.addFunction(new DivideFuntion());
        }
        return instance;

    }


}
